package com.neu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neu.entity.TaskUser;
import com.neu.mapper.TaskUserMapper;
import com.neu.service.TaskUserService;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

@Service
public class TaskUserServiceImpl extends ServiceImpl<TaskUserMapper, TaskUser> implements TaskUserService {
    @Override
    public List<TaskUser> getTaskIdsByUserId(String userId) {
        if(StringUtils.hasText(userId)){
            return null;
        }
        LambdaQueryWrapper<TaskUser> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(TaskUser::getUserId, userId);

        return this.list(queryWrapper);
    }
}
